package com.demo.enums;

/**
 * 消息枚举
 * 消息类型1评估提醒2诊断提醒3处置提醒4医嘱提醒5设备提醒6总结提醒9.复核消息
 */
public enum MessageTypeEnum {
    PING_GU_REMIND(1, "评估提醒"),
    ZHEN_DUAN_REMIND(2, "诊断提醒"),
    CHU_ZHI_REMIND(3, "处置提醒"),
    YI_ZHU_REMIND(4, "医嘱提醒"),
    SHE_BEI_REMIND(5, "设备提醒"),
    ZONG_JIE_REMIND(6, "总结提醒"),
    FU_HE_REMIND(9, "复核消息");

    private int value;
    private String desc;

    MessageTypeEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static MessageTypeEnum getByValue(Integer value) {
        for (MessageTypeEnum item : values()) {
            if (item.getValue() == value) {
                return item;
            }
        }
        return null;
    }
}
